import request from '@/utils/request/index'

export function getAbilityList(data) {
  return request({
    url: `/service/system/ability/getAbilityInfoListByParam`,
    method: 'post',
    data
  })
}

export function getAllAbilityTag() {
  return request({
    url: `/service/system/ability/getAllAbilityTag`,
    method: 'get'
  })
}

export function getAllAbilityTotal() {
  return request({
    url: `/service/system/ability/getAbilityTotal`,
    method: 'post'
  })
}

export function getAbilityDetail(id) {
  return request({
    url: `/service/system/ability/getAbilityInfoDetail?id=${id}`,
    method: 'post'
  })
}

// 获取套餐
export function getAbilityPackage(id) {
  return request({
    url: `/service/system/aaasability/admin/getDetailInfoById`,
    method: 'get',
    params: {
      id
    }
  })
}

// 获取API
export function getAbilityAPIS(id) {
  return request({
    url: `/open/rest/apiportal/apis/showdetails?id=${id}&format=json`,
    method: 'get'
  })
}
